import request from '@/utils/request'

/**
 * @description: 获取供应商资料清单
 * @param {*} params
 * @return {*}
 */
export function getSupplierList(params) {
  return request({
    url: '/supplier/list',
    params
  })
}

/**
 * @description: 供应商资料新增
 * @param {*} data
 * @return {*}
 */
export function addSupplierItem(data) {
  return request({
    url: '/supplier/add',
    method: 'post',
    data
  })
}

/**
 * @description: 获取供应商资料详情
 * @param {*} params
 * @return {*}
 */
export function getSupplierDetail(params) {
  return request({
    url: '/supplier/detail',
    params
  })
}

/**
 * @description: 更新供应商资料
 * @param {*} data
 * @return {*}
 */
export function updateSupplierItem(data) {
  return request({
    url: '/supplier/update',
    method: 'post',
    data
  })
}

/**
 * @description: 删除供应商资料
 * @param {*} data
 * @return {*}
 */
export function deleteSupplierItem(data) {
  return request({
    url: '/supplier/delete',
    method: 'post',
    data
  })
}
